Skip to content

Instantly share code, notes, and snippets.

@jfbueno
Last active February 28, 2016 15:07
Show Gist options
  • Save jfbueno/035b1e50b295a7e9bc2b to your computer and use it in GitHub Desktop.
Save jfbueno/035b1e50b295a7e9bc2b to your computer and use it in GitHub Desktop.
values = [1, 4, 5, 2, 3, 6, 9, 7, 8]
for i in sorted(values):
print(i)
#[print(v) for v in sorted(values)] ou assim usando compreensão
soma = sum(values)
print('soma %d' % soma)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment