mirror of
				https://github.com/KevinMidboe/knowit_julekalender-2017.git
				synced 2025-10-29 17:50:18 +00:00 
			
		
		
		
	Not completed yet. Only reads of file and prints the needed values per line.
This commit is contained in:
		
							
								
								
									
										22
									
								
								luke_6/lightning_mc_queen.py
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										22
									
								
								luke_6/lightning_mc_queen.py
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,22 @@ | ||||
| #!/usr/bin/env python3.6 | ||||
|  | ||||
| from pprint import pprint | ||||
|  | ||||
| def readFile(): | ||||
|     with open('./verda.txt', 'r') as f: | ||||
|         read_data = f.read().splitlines() | ||||
|     f.close() | ||||
|     return read_data | ||||
|  | ||||
| def main(): | ||||
|     data = readFile() | ||||
|     for line in data[1:]: | ||||
|         listview = line.split('\t') | ||||
|         city = listview[3] | ||||
|         country = listview[10] | ||||
|         cord = [listview[12], listview[13]] | ||||
|         print('place: {}', city, 'in', country) | ||||
|         print('cord:', cord) | ||||
|  | ||||
| if __name__=='__main__': | ||||
|     main() | ||||
							
								
								
									
										16371
									
								
								luke_6/verda.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16371
									
								
								luke_6/verda.txt
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Reference in New Issue
	
	Block a user