Добавлены файлы data.txt, script.py
This commit is contained in:
		
							parent
							
								
									797e27964f
								
							
						
					
					
						commit
						94df79bcdd
					
				
							
								
								
									
										12
									
								
								script.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								script.py
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,12 @@ | ||||
| # script.py | ||||
| 
 | ||||
| with open('data.txt', 'r', encoding='utf-8') as file: | ||||
|     lines = file.readlines() | ||||
| 
 | ||||
| uppercase_lines = [line.strip().upper() for line in lines] | ||||
| 
 | ||||
| with open('output.txt', 'w', encoding='utf-8') as output_file: | ||||
|     for line in uppercase_lines: | ||||
|         output_file.write(line + '\n') | ||||
| 
 | ||||
| print("Данные успешно записаны в output.txt") | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user