Добавлены файлы data.txt, script.py
This commit is contained in:
		
							parent
							
								
									4ed802a1dc
								
							
						
					
					
						commit
						2ba302629e
					
				
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -1 +1,2 @@ | |||||||
| .venv/ | .venv/ | ||||||
|  | output.txt | ||||||
							
								
								
									
										
											BIN
										
									
								
								requirements.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								requirements.txt
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										9
									
								
								script.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								script.py
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,9 @@ | |||||||
|  | with open('data.txt', 'r') as input_file: | ||||||
|  |     data = input_file.readlines() | ||||||
|  | 
 | ||||||
|  | uppercase_data = [line.upper() for line in data] | ||||||
|  | 
 | ||||||
|  | with open('output.txt', 'w') as output_file: | ||||||
|  |     output_file.writelines(uppercase_data) | ||||||
|  | 
 | ||||||
|  | print("Данные успешно записаны в файл output.txt") | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user