Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
commenting some commands
commenting some commands
  • Loading branch information
samedhaa committed Aug 31, 2018
commit 29286a52e0644892f1591e71985ec9241825d920
3 changes: 2 additions & 1 deletion basic_commands.py
Original file line number Diff line number Diff line change
@@ -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