#Cant set value of a string
5 messages · Page 1 of 1 (latest)
input returns a string
Damn kintec, you're too quick
So you are checking if '1' == 1. Probably best to convert your input to an int
Yes, thanks it worked
5 messages · Page 1 of 1 (latest)
uin = 'place holder'
psel = input(' 1. for X \n 2. for O \n')
if psel == 1:
uin = 'X'
elif psel == 2:
uin = 'O'
print(uin)
Why i am unable to change string value?
input returns a string
Damn kintec, you're too quick
So you are checking if '1' == 1. Probably best to convert your input to an int
Yes, thanks it worked