Python 3.14.3 (tags/v3.14.3:323c59a, Feb 3 2026, 16:04:56) [MSC v.1944 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
DreamPie 1.2.1
>>> xs = "1;Philosopher's Stone;2001;Chris Columbus;$1,006,968,171 "
>>> xs.split()
0: ["1;Philosopher's", 'Stone;2001;Chris', 'Columbus;$1,006,968,171']
>>> len(xs.split())
1: 3
>>> xs.split()[-1]
2: 'Columbus;$1,006,968,171'
>>> (xs.split())[-1]
3: 'Columbus;$1,006,968,171'
>>> xs.split(';')
4: ['1', "Philosopher's Stone", '2001', 'Chris Columbus', '$1,006,968,171 ']
>>> sloupečky = xs.split(';')
>>> sloupečky
5: ['1', "Philosopher's Stone", '2001', 'Chris Columbus', '$1,006,968,171 ']
>>> type(sloupečky)
6: <class 'list'>
>>> len(sloupečky)
7: 5
>>> dir(sloupečky)
8: ['__add__',
'__class__',
'__class_getitem__',
'__contains__',
'__delattr__',
'__delitem__',
'__dir__',
'__doc__',
'__eq__',
'__format__',
'__ge__',
'__getattribute__',
'__getitem__',
'__getstate__',
'__gt__',
'__hash__',
'__iadd__',
'__imul__',
'__init__',
'__init_subclass__',
'__iter__',
'__le__',
'__len__',
'__lt__',
'__mul__',
'__ne__',
'__new__',
'__reduce__',
'__reduce_ex__',
'__repr__',
'__reversed__',
'__rmul__',
'__setattr__',
'__setitem__',
'__sizeof__',
'__str__',
'__subclasshook__',
'append',
'clear',
'copy',
'count',
'extend',
'index',
'insert',
'pop',
'remove',
'reverse',
'sort']
[About 47 more lines. Double-click to unfold]
>>> pořadí, název, rok, režisér, tržby = xs.split(';')
>>> režisér
9: 'Chris Columbus'
>>> rok
10: '2001'
>>> tržby
11: '$1,006,968,171 '
>>> xs
12: "1;Philosopher's Stone;2001;Chris Columbus;$1,006,968,171 "
>>> xs += '\n'
>>> xs
13: "1;Philosopher's Stone;2001;Chris Columbus;$1,006,968,171 \n"
>>> xs.strip()
14: "1;Philosopher's Stone;2001;Chris Columbus;$1,006,968,171"
>>> xs.strip('1')
15: ";Philosopher's Stone;2001;Chris Columbus;$1,006,968,171 \n"
>>> xs.strip('; 1')
16: "Philosopher's Stone;2001;Chris Columbus;$1,006,968,171 \n"
>>> _
17: "Philosopher's Stone;2001;Chris Columbus;$1,006,968,171 \n"
>>> _3
18: 'Columbus;$1,006,968,171'
>>> xs = '$1,006,968,171'
>>> int()
19: 0
>>> int('1006968171')
20: 1006968171
>>> type('1006968171')
21: <class 'str'>
>>> type(1006968171)
22: <class 'int'>
>>> int('1_006_968_171')
23: 1006968171
>>> type(1_006_968_171)
24: <class 'int'>
>>> type(100_69681_71)
25: <class 'int'>
>>> xs
26: '$1,006,968,171'
>>> xs.strip('$')
27: '1,006,968,171'
>>> xs.lstrip('$')
28: '1,006,968,171'
>>> int(xs.lstrip('$'))
Traceback (most recent call last):
File "<pyshell#34>", line 1, in <module>
int(xs.lstrip('$'))
~~~^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: '1,006,968,171'
>>> int(xs)
Traceback (most recent call last):
File "<pyshell#35>", line 1, in <module>
int(xs)
~~~^^^^
ValueError: invalid literal for int() with base 10: '$1,006,968,171'
>>> xs.lstrip('$')
29: '1,006,968,171'
>>> xs.lstrip('$').replace(',', '')
30: '1006968171'
>>> xs.replace(',', '')
31: '$1006968171'
>>> xs.replace(',', '').strip('$')
32: '1006968171'
>>> int(xs.replace(',', '').strip('$'))
33: 1006968171
>>> xs
34: '$1,006,968,171'
>>> xs = ('3', 'Prisoner of Azkaban', '2004', 'Alfonso Cuarón', '$797,361,618')
>>> ';'.join(xs)
35: '3;Prisoner of Azkaban;2004;Alfonso Cuarón;$797,361,618'
>>> ' | '.join(xs)
36: '3 | Prisoner of Azkaban | 2004 | Alfonso Cuarón | $797,361,618'
>>> xs
37: ('3', 'Prisoner of Azkaban', '2004', 'Alfonso Cuarón', '$797,361,618')
>>> for prvek in xs:
... print(prvek)
3
Prisoner of Azkaban
2004
Alfonso Cuarón
$797,361,618
>>> it = iter(prvek)
>>> it
38: <str_ascii_iterator object at 0x0000014448CEF670>
>>> next(it)
39: '$'
>>> film = xs
>>> it = iter(film)
>>> next(it)
40: '3'
>>> next(it)
41: 'Prisoner of Azkaban'
>>> next(it)
42: '2004'
>>> next(it)
43: 'Alfonso Cuarón'
>>> next(it)
44: '$797,361,618'
>>> next(it)
Traceback (most recent call last):
File "<pyshell#57>", line 1, in <module>
next(it)
~~~~^^^^
StopIteration
>>> film
45: ('3', 'Prisoner of Azkaban', '2004', 'Alfonso Cuarón', '$797,361,618')
>>> it = iter(film)
>>> next(it)
46: '3'
>>> next(it)
47: 'Prisoner of Azkaban'
>>> for prvek in it:
... print(prvek)
2004
Alfonso Cuarón
$797,361,618
>>>