No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
2 Posted Topics
The same code is being print, when the sys.argv[] function hasn't been done. [code=python] #!/usr/bin/env python #-*- coding: utf-8 -*- #test.py #run it like this: #python test.py <some_string> #where <some_string> is random letter, which you will write import sys test_argv = sys.argv[1] if test_argv != '': print "Hello World!" [/code] …
I've got a code fragment: [CODE] #!/usr/bin/env python import sys num_lst = [] num_circ = [] while True: print "Type number or [e]nd operation" inpt = sys.stdin.readline() print inpt if inpt == 'e': sys.stdin.flush() print "\n" break else: num_lst.append(inpt) sys.stdin.flush() for i in num_lst: if isinstance(i, int): num_circ.append(i) else: pass …
The End.
ryniek