Skip to content

Instantly share code, notes, and snippets.

@TrevorMcCormick
Created May 28, 2020 19:23
Show Gist options
  • Save TrevorMcCormick/b346bb0ecc773afb56027cc8cea09e7a to your computer and use it in GitHub Desktop.
Save TrevorMcCormick/b346bb0ecc773afb56027cc8cea09e7a to your computer and use it in GitHub Desktop.
# Given a list of numbers, figure out how many have an even number of digits
import math
def numDigits(num):
digits = math.floor(math.log10(num))+1
return(digits)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment