I'm trying to check user-input against the list I created inside a function. What is the best way to pass variables between functions without using globals?
def counter():
integers = []
x = 0
while x < 100:
x = x + 1
integers.append (x)
#print integers
return
integers_global = counter ()
print integers_global
speed = int (raw_input ("what is the speed of an unladen swallow in km/h (enter a number): "))
if speed in integers_global:
print "the speed of the swallow is equal to", speed, "km/h"
else:
print "the speed of the swallow is equal to %r" %speed