Sep-30-2017, 08:01 PM
based on your code:
import random def test(arg): if arg > 3: a = 1 else: a = 0 return a def main(): arg = random.randrange(0,7) a = test(arg) # here you can use any name, not neccessary to be a if a == 1: print("I don't know what i'm doing")more pythonic would be
import random def test(arg): return arg >3 def main(): arg = random.randrange(0,7) if test(arg): print("I don't know what i'm doing")also note the double quotes of the string - otherwise you need to escape the single quotes