[1,3,3,2,1] What should I do to make it so that 2 is printed out?
>>> from collections import Counter >>> l = [ 1,3,3,2,1] >>> counter = Counter(l) >>> counter Counter({1: 2, 3: 2, 2: 1}) >>> odd_counts = [ k for k, v in counter.items() if v%2 ] >>> odd_counts [2]
819 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
565 PHP ssh2_scp_send fails to send files as intended
562 Understanding How to Configure Google API Key
573 Scrap text information after the "View More" button when searching in the Yahoo! News search window
796 /usr/bin/google-chrome:symbol lookup error:/usr/bin/google-chrome: undefined symbol:gbm_bo_get_modifier
© 2024 OneMinuteCode. All rights reserved.