Carleii Dev Posted on Apr 26, 2022 Powerful one line codes in python #python #devops #c4rl3 Top comments (3) Subscribe Collapse Expand Jon Randy ποΈ Jon Randy ποΈ Jon Randy ποΈ Follow π€ Artisanal developer - coding with varying degrees of success since 1983 Location Bangkok πΉπ Joined Jun 1, 2018 • Apr 27 '22 • Edited on Apr 27 • Edited Dropdown menu Copy link Hide even_numbers = [x for x in range(11) if ~x&1] even_numbers = [x for x in range(11) if not x&1] Enter fullscreen mode Exit fullscreen mode One of these are probably quicker if you care about micro-optimising for speed Collapse Expand Carleii Dev Carleii Dev Carleii Dev Follow Take a look to my GitHub.. maybe you can find something interesting π Email devcarle@gmail.com Location Cameroon Education ??? Work Senior dev Joined Mar 25, 2022 • Apr 27 '22 Dropdown menu Copy link Hide Nice one thanks Collapse Expand Juan Ignacio Borda Juan Ignacio Borda Juan Ignacio Borda Follow Joined Feb 19, 2018 • Jun 22 '22 Dropdown menu Copy link Hide Do you think the compiler (JIT) will tokenize'em differently? Code of Conduct • Report abuse For further actions, you may consider blocking this person and/or reporting abuse
Top comments (3)
One of these are probably quicker if you care about micro-optimising for speed
Nice one thanks
Do you think the compiler (JIT) will tokenize'em differently?