Python Taskbook Level 7.6
Given a text file. Get the percentage of each character. Write the result to a new file.
The file contains Russian text. Open this file, convert the text to transliteration and write it to a new file.
Given a text file, shuffle the lines in this file in random order.
Get a list of all possible lucky tickets. A ticket is a string of six digits, possibly with leading zeros. A ticket is lucky if the sum of the first three digits equals the sum of the second three digits. Write the resulting list to a file, each ticket on a new line.
Write a program that will generate the following list:
[
'x',
'xx',
'xxx',
'xxxx',
'xxxxx',
]
The following dictionary is given:
lst = {
2018: {
11: {
29: [1, 2, 3],
30: [4, 5],
},
12: {
30: [6, 7],
31: [8, 9],
},
},
2019: {
12: {
29: [10, 11],
30: [12, 13],
31: [14, 15],
}
},
}
Write all the elements of this dictionary into a new list, like this:
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]