<p>我试着打开一个csv文件,这样我就可以将我的彩票号码(从1到54随机生成的6个整数)与1992年至2017年的中奖号码进行比较,这也是csv文件所包含的内容。在</p>
<pre><code>import random
import csv
six_random_int =[random.randint(1,54),random.randint(1,54),random.randint(1,54),random.randint(1,54),random.randint(1,54),random.randint(1,54)]
print('Your lotto ticket is ',six_random_int)
with open('lottotexas.csv','r') as f: #This is where the error is occurring
reader = csv.reader(f)
for row in reader:
print(row)
</code></pre>
<p>我一直收到错误:</p>
^{pr2}$
<p>我把csv文件下载到我的电脑上,但我不知道从那里到哪里,这样我的python程序就可以找到csv文件。在</p>