Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- decoded = []
- lines = int(input('please enter the amount of lines of RLE compressed data'))
- while lines <2:
- print('enter a value above two')
- lines = int(input('please enter the amount of lines of RLE compressed data'))
- for i in range (lines):
- encoded = input('Enter compressed data: ')
- index = 0
- index2 = 2
- string = ''
- for i in range (0,len(encoded)//3):
- num = int(encoded[index:index2])
- char = encoded[index2]
- a = (num*char)
- string += a
- index += 3
- index2 += 3
- decoded.append(string)
- for i in range (len(decoded)):
- print(decoded[i])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement