Empty set literal?
[] = empty list () = empty tuple {} = empty dict Is there a similar notation for an empty set? Or do I have to write set()? 7 s 7 No, there’s no literal syntax for the empty set. You have to write set().
[] = empty list () = empty tuple {} = empty dict Is there a similar notation for an empty set? Or do I have to write set()? 7 s 7 No, there’s no literal syntax for the empty set. You have to write set().
In a verbatim string literal (@”foo”) in C#, backslashes aren’t treated as escapes, so doing \” to get a double quote doesn’t work. Is there any way to get a double quote in a verbatim string literal? This understandably doesn’t work: string foo = @”this \”word\” is escaped”; 6 s 6
I recently compared the processing speeds of [] and list() and was surprised to discover that [] runs more than three times faster than list(). I ran the same test with {} and dict() and the results were practically identical: [] and {} both took around 0.128sec / million cycles, while list() and dict() took … Read more