'If' Statement for Checking the Value of a String/Integer?
Hello All,
I'm looking to use an 'if' statement to check the value of a string/integer. I understand the basics of string => integer conversion, and integer => string conversion, and this is the code I have so far:
-----
variable = input("TYPE HERE")
variable = (int(variable))
if variable(1):
popup("Hello, Mate!")
popup(variable)
-----
The previous script is supposed to convert the input (string) to an integer, and compare the integer to see if it equals '1'. If so, a dialog box will appear, displaying 'Hello, Mate!' I'm not sure if I need to convert the input (which is in string form), to an integer in order to compare it or not, but when I run this script, I receive the following:
-----
TypeError: 'str' object is not callable
-----
Any suggestions?
Any and all help is greatly appreciated.
-dwmcc
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Dylan McCarthy for more information if necessary.