'<=' not supported between instances of 'int' and 'method'
Question:
Answers:
You have a typo in the first line of buttonFunction()
, it should be Pole_tekstowe.get()
. The Parentheses are important
It is because L2
is just the reference to the function Pole_tekstowe.get
, you need to use Pole_tekstowe.get()
to get the input text and use int()
to convert it to integer in order to pass it as the second argument of random.sample()
:
L2 = int(Pole_tekstowe.get())
You have a typo in the first line of buttonFunction()
, it should be Pole_tekstowe.get()
. The Parentheses are important
It is because L2
is just the reference to the function Pole_tekstowe.get
, you need to use Pole_tekstowe.get()
to get the input text and use int()
to convert it to integer in order to pass it as the second argument of random.sample()
:
L2 = int(Pole_tekstowe.get())