Skip to content

Commit 5aac6bc

Browse files
committed
Fixes
1 parent 37f909e commit 5aac6bc

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

04 More on Variables/1 Operations on sequences.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ Another useful operation is checking if a given element is present in the sequen
3131
```python
3232
if 'a' in 'Alice':
3333
print("The word 'Alice' contains the letter 'a'")
34+
else
35+
print("No 'a' in 'Alice'")
3436

3537
if 4 not in (2, 3, 5, 7, 11, 13, 17, 19):
3638
print("Four is not a prime less than 20")

04 More on Variables/2 Lists.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ print(list) # ['A', 'X', 'B', 'C']
5858

5959
Below is an example of creating a names list. Please run it and analyze it:
6060

61-
```
61+
```python
6262
names = [] # this creates an empty list
6363

6464
# The following loop will run infinitely
@@ -79,7 +79,7 @@ You can convert lists to tuples and vice versa without any restrictions. This wa
7979
```python
8080
my_tuple = (1, 2, 3)
8181
my_list = list(my_tuple)
82-
list[0] = 10
82+
my_list[0] = 10
8383
my_tuple = tuple(my_list)
8484
print(my_tuple)
8585
```

0 commit comments

Comments
 (0)