python - pycharm return outside of function
巴扎黑
巴扎黑 2017-05-18 10:58:28
0
1
1035
class data_list:
    file_list = os.listdir(os.getcwd())
    data_file = []
    for i in file_list:
        if i.endswith('.js'):
            data_file.append(i)
    return data_file

I don’t know why this error is reported. May I ask what is wrong?

巴扎黑
巴扎黑

reply all(1)
曾经蜡笔没有小新

What you defined above is a classclass data_list, not a function.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template