Reputation: 1
I keep getting the error that str object is not callable. my line of code is pasted below... can anyone tell me what I am doing wrong.
random = str(uuid.uuid4().hex().upper()[0:6])
Upvotes: 0
Views: 84
Reputation: 29099
change hex()
to hex
. .hex
is a property, not a function, and it already returns a string.
Upvotes: 1