n = 254print(sum([int(i) for i in str(n)]))
Standard input is empty
11
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!