-
-
Save ciupicri/6844058 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! usr/bin/python | |
import sys | |
def parse(filename): | |
print "parsing", filename | |
def main(): | |
parse(sys.argv[1]) | |
if __name__ == '__main__': | |
main() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
strings = ["hello,I,am,doing,well" , "how,are,you"]
for string in strings:
t = string.split(",")
var1 = t[0]
var2 = t[1]
var3 = t[2]
var4 = t[3]
Question. While parsing the second string I want var4 to get "null" or an equivalent value. How to do this ?