python import list from py file

Solutions on MaxInterview for python import list from py file by the best coders in the world

showing results for - "python import list from py file"
Jakob
25 Mar 2019
1# In first .py file
2mylist = ['this', 'that', 'theother']
3
4# In second file
5from variables import mylist