May-06-2021, 09:58 PM
(This post was last modified: May-06-2021, 09:59 PM by nostradamus64.)
(May-06-2021, 09:42 PM)snippsat Wrote:# result.py from my_record import foo def bar(): print(f'The car vaules is <{foo()[1].get("car")}>') bar()Look at at how modules work is the simplest way to use use
Output:The car vaules is <641>import
.
So here is both files in same folder.
This is file i import from.
# my_record.py def foo(): my_lst = [ {"foo": 12, "bar": 14}, {"moo": 52, "car": 641}, {"doo": 6, "tar": 84}, ] return my_lstHere a post where explain more a packages(a way to organize more files/folders).
Thank you, and if i use the module pwd and systemd how could i get info about my users UID, name, shell(login) and if they are logged in or not with an asterisk symbol to symbolise it?