Posts by Bruno Luiz Bender • 31 points
2 posts
-
0
votes1
answer189
viewsQ: Python error saying that the file does not exist, but it does exist
Code: import csv import random dataset = [] with open('data.csv') as _file: data = csv.reader(_file,delimiter=',') for line in data: line = [float(elemento) for elemento in line]…
pythonasked Bruno Luiz Bender 31 -
0
votes1
answer208
viewsQ: How to use a global variable in a python function?
I’m trying to make a system of lootbox in python, but I can’t use an outside variable within the function from main import player from random import randint p1 = player class item: def lootbox(a,c):…