We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84d890c commit d53e855Copy full SHA for d53e855
random_names.py
@@ -50,7 +50,7 @@ def rawCount(filename):
50
51
def randomLine(filename):
52
num = int(random.uniform(0, rawCount(filename)))
53
- with open(filename, 'r') as f:
+ with open(filename, 'r', encoding="UTF-8") as f:
54
for i, line in enumerate(f, 1):
55
if i == num:
56
break
0 commit comments