Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 524af79

Browse files
Merge pull request ujjwalkarn#13 from samedhaa/master
commenting some commands
2 parents dbcc0d6 + 29286a5 commit 524af79

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎basic_commands.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
>>> a = ['a', 'b', 'c', 'd', 'e']
2-
>>> for index, item in enumerate(a): print index, item
2+
>>> for index, item in enumerate(a): print index, item# enumerate function will generate an index for the item + item it self.
33
...
44
0 a
55
1 b
@@ -37,6 +37,7 @@
3737
str1 = "this is string example....wow!!!";
3838
str2 = "exam";
3939

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

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /