Skip to content

Commit

Permalink
commenting some commands
Browse files Browse the repository at this point in the history
commenting some commands
  • Loading branch information
samedhaa committed Aug 31, 2018
1 parent 02c13c5 commit 29286a5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion basic_commands.py
@@ -1,5 +1,5 @@
>>> a = ['a', 'b', 'c', 'd', 'e']
>>> for index, item in enumerate(a): print index, item
>>> for index, item in enumerate(a): print index, item # enumerate function will generate an index for the item + item it self.
...
0 a
1 b
Expand Down Expand Up @@ -37,6 +37,7 @@
str1 = "this is string example....wow!!!";
str2 = "exam";

# find function will print the position for the first character of the string if it's found!
print str1.find(str2);
print str1.find(str2, 10);
print str1.find(str2, 40);
Expand Down

0 comments on commit 29286a5

Please sign in to comment.