This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| print('#' * 40) | |
| print('############### Welcome! ###############') | |
| print('#' * 40) | |
| x = input('Enter word:') | |
| result = x | |
| for i in x: | |
| result = result[:-1] | |
| print(result) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| print('########################################') | |
| print('############### Welcome! ###############') | |
| print('########################################') | |
| word = input('Enter word that needs to be reduced one letter by one: ') | |
| counter = len(word) | |
| for letter in word: | |
| current_result = '' | |
| counter -= 1 | |
| for c in range(counter): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| print('Please enter word to add to list, program will stop on empty line entered') | |
| word = input(':') | |
| result = [] | |
| while word: | |
| result.append(word) | |
| word = input(':') | |
| result.reverse() | |
| for word in result: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| print('Please enter word to add to list, program will stop on empty line entered') | |
| word = input(':') | |
| result = [] | |
| while word: | |
| result.append(word) | |
| word = input(':') | |
| for word in result: | |
| print(word[::-1]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| print('Please enter word to add to list, program will stop on empty line entered') | |
| word = input(':') | |
| result = [] | |
| while word: | |
| result.append(word) | |
| word = input(':') | |
| for word in result: | |
| r_text = '' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # coding=utf-8 | |
| file = open('C:\\file.txt', 'r', encoding ='utf-8') | |
| lines = file.readlines() | |
| file.close() | |
| number_of_words_per_line = [] | |
| for line in lines: | |
| line.replace(".","") | |
| line.replace(",","") | |
| line.replace("!","") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| describe('Protractor Experiments', function () { | |
| beforeEach(function () { | |
| var customMatchers = { | |
| toAppear: function () { | |
| return { | |
| compare: function(actual, expected) { | |
| return { | |
| pass: actual.ptor_.wait(protractor.ExpectedConditions.visibilityOf(actual), 2000) | |
| .thenCatch((err) => false), | |
| message: 'OLOLO FAILED! ' + actual.parentElementArrayFinder.locator_.toString() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # coding=utf-8 | |
| with open('text.txt') as f: | |
| lines = f.readlines() | |
| lines = [line.decode("utf-8") for line in lines] | |
| print '###TASK 1:' | |
| for line in lines: | |
| if len(line) > 20: | |
| print line |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # coding=utf-8 | |
| ALPHABET = u'абвгдеёжзийклмнопрстуфхцчшщъыьэюя' | |
| with open('text.txt') as f: | |
| lines = f.readlines() | |
| lines = [line.decode("utf-8") for line in lines] | |
| print '###TASK 1:' | |
| for line in lines: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # coding=utf-8 | |
| ALPHABET = u'абвгдеёжзийклмнопрстуфхцчшщъыьэюя' | |
| with open('text.txt') as f: | |
| lines = f.readlines() | |
| lines = [line.decode("utf-8") for line in lines] | |
| print '###TASK 1:' | |
| for line in lines: |