Quantcast
Channel: How to use a dot "." to access members of dictionary? - Stack Overflow
Viewing all articles
Browse latest Browse all 40

Answer by hardika for How to use a dot "." to access members of dictionary?

$
0
0

You can achieve this using SimpleNamespace

from types import SimpleNamespace# Assign valuesargs = SimpleNamespace()args.username = 'admin'# Retrive valuesprint(args.username)  # output: admin

Viewing all articles
Browse latest Browse all 40

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>