CGI or Python?
Using CGI is a good idea.
User Profile
Collapse
-
In case of debugging opened in python library, it can be quit by pressing "q".Leave a comment:
-
'If not' is a condition which is used to check whether the list is empty or not
for example:Code:lister=[] if not lister: print "list is in empty"
Leave a comment:
-
Execute conditional if statement to avoid infinite for loop execution below small example.
example:
for i in l:
if somecondition:
breakLeave a comment:
-
Code:def count_words(file_name ): fname = file_name num_lines = 0 num_words = 0 with open(fname, 'r') as f: for line in f: words = line.split() num_lines += 1 num_words += len(words) return num_words words_count = count_words(file_name
Last edited by zmbd; Dec 14 '12, 05:37 AM. Reason: [Z{Please format code using the <CODE/> button}{In the future explain your code or it may be deleted!}]Leave a comment:
-
step 1:
1. open the terminal and type the below command.
nano myfile.py
2. Once you done this you have file opened in the name of myfile.py, then do all your programming stuff in the file.
3. Then press (ctrl+o) in the keyboard then your file will be saved.
4. Then press (ctrl+exit) , u will see the terminal again.
5. Now run the below command where the file reside
example: your...Leave a comment:
No activity results to display
Show More
Leave a comment: