Threading not working | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Threading not working

Hi, can anyone tell me why this code produces an error? Much appreciated! https://code.sololearn.com/cYLVl51U67hS/?ref=app

14th Apr 2018, 9:43 AM
Ghadir M. Abu-Risha
2 Answers
0
Ghadir M. Abu-Risha 1. You have an error in your args parameter while calling threading.Thread. You have args = (i), but this is not an iterable, as required. So, try to use args = (i,) (note the comma) to explicitly make it a tuple. 2. You need to convert your variable to str type in your Typing function: print ('Just typing here for the ' + str(i) + 'time')
14th Apr 2018, 10:31 AM
strawdog
strawdog - avatar
0
strawdog It works now, many thanks :)
14th Apr 2018, 10:46 AM
Ghadir M. Abu-Risha