Загрузить файлы в «/»
This commit is contained in:
		
							parent
							
								
									90ddb0e565
								
							
						
					
					
						commit
						e941f1957a
					
				
							
								
								
									
										6
									
								
								requirements.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								requirements.txt
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,6 @@ | ||||
| numpy==2.2.3 | ||||
| pandas==2.2.3 | ||||
| python-dateutil==2.9.0.post0 | ||||
| pytz==2025.1 | ||||
| six==1.17.0 | ||||
| tzdata==2025.1 | ||||
							
								
								
									
										20
									
								
								script.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								script.py
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,20 @@ | ||||
| def main(): | ||||
|     input_file = 'data.txt' | ||||
|     output_file = 'output.txt' | ||||
| 
 | ||||
|     try: | ||||
|         with open(input_file, 'r', encoding='utf-8') as file: | ||||
|             lines = file.readlines() | ||||
|     except FileNotFoundError: | ||||
|         print(f"Файл {input_file} не найден.") | ||||
|         return | ||||
| 
 | ||||
|     transformed_lines = [line.upper() for line in lines] | ||||
| 
 | ||||
|     with open(output_file, 'w', encoding='utf-8') as file: | ||||
|         file.writelines(transformed_lines) | ||||
| 
 | ||||
|     print(f"Преобразованные данные записаны в {output_file}.") | ||||
| 
 | ||||
| if __name__ == "__main__": | ||||
|     main() | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user