07-13-2018, 09:50 AM 
		
	
	
		I'm trying to learn Python3 from the book Learn Python 3 the Hard Way and find it hard going especially when the code keeps on displaying an error. Take for instance, exercise 20.
I keep getting the following error
I've come across this error on a previous exercise but sadly misplaced my notes on how to remedy the error. Can someone help me please.  
	
	
	
Code:
# ex20: Functions and Files    
   from sys import argv    
   script, input_file = argv    
   def print_all(f):       print(f.read())    
   def rewind(f):       f.seek(0)   
def print_a_line(line_count, f):       print(line_count, f.readline())    
   current_file = open(input_file)    
   print("First let's print the whole file:\n")    
   print_all(current_file)    
   print("Now let's rewind, kind of like a tape.")    
   rewind(current_file)    
   print("Let's print three lines:")    
   current_line = 1   print_a_line(current_line, current_file)    
   current_line = current_line + 1   print_a_line(current_line, current_file)    
   current_line = current_line + 1   print_a_line(current_line, current_file)Code:
colin@my_new_LinuxLite4.0:~$ python3 ~/python_exp/ex20.pyTraceback (most recent call last):    File "/home/colin/python_exp/ex20.py", line 7, in <module>       script, input_file = argvValueError: not enough vales to unpack (expected 2, got 1)colin@my_new_LinuxLite4.0:~$
Old and getting even older lol
	
	

 
 

 


 .
 .![[Image: colin1.png]](https://preview.ibb.co/bCMiHU/colin1.png)
![[Image: colin2.png]](https://preview.ibb.co/nsUW49/colin2.png)
![[Image: colin3.png]](https://preview.ibb.co/irRYHU/colin3.png)

![[Image: col1.png]](https://preview.ibb.co/c61R7U/col1.png)
![[Image: col2.png]](https://preview.ibb.co/m3O67U/col2.png)
![[Image: Screenshot_2018_09_27_17_42_28.png]](https://preview.ibb.co/hfVDP9/Screenshot_2018_09_27_17_42_28.png)