The whole slice in Python

To get the entire slice, you can use the [:] operator:

pythontxt = 'abcde'
res = txt[:]

print(res) # 'abcde'

Such slices may be needed to copy the original object. Let's copy our string using a slice:

pythontxt1 = 'abcde'
txt2 = txt1[:]

print(txt2) # 'abcde'
Задание 1

Given a list:

pythonlst = [1, 2, 3]

Copy it.

Задание 2

Given a number:

pythonnum = 4567

Write the code to get the following result:

python'4567'