Learning Python and a little bit stuck.
I\'m trying to set a variable to equal int(stringToInt) or if the string is empty set to None.
int(stringToInt)
None
I think this is the clearest way:
variable = int(stringToInt) if stringToInt.isdigit() else None