Skip to content

Commit 0dbf3ac

Browse files
committed
Use f-string
1 parent 114bafe commit 0dbf3ac

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lessons/beginners/modules/index.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ barva_travy = 'zelená'
5858
pocet_kotatek = 28
5959

6060
def popis_stav():
61-
return 'Tráva je {barva}. Prohání se po ní {pocet} koťátek'.format(
62-
barva=barva_travy, pocet=pocet_kotatek)
61+
return f'Tráva je {barva_travy}. Prohání se po ní {pocet_kotatek} koťátek'
6362
```
6463

6564
A pak do dalšího souboru, třeba `vypis.py`, napiš:

0 commit comments

Comments
 (0)