Is there a more elegant way to spell this?

Mario Figueiredo marfig at gmail.com
Wed Jan 28 02:19:03 CET 2015


In article <54c8339f$0$13008$c3e8da3$5496439d at news.astraweb.com>, 
steve+comp.lang.python at pearwood.info says...
> (3) _ is also commonly used as a "don't care" variable name:
> 
> a, _, b, _ = get_four_items()  # but I only care about two of them
> 

According to the following link, it is actually a double underscore:
http://docs.python-guide.org/en/latest/writing/style/#idioms



More information about the Python-list mailing list