Tkinter Input Issue

Hi guys, this may be a stupid question but how can I gat an integer input from a tkinter gui? Like Entry() with the typing shell but only for integers?

14th Apr 2020, 5:47 PM
Sigma - avatar
1 Answer
+ 2
First accept the input as string then convert it to an integer using the int() function. a = int(accepted_string) print(type(a)) # <class int>
14th Apr 2020, 5:58 PM
Mirielle - avatar