File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -446,7 +446,7 @@ ABd1234@1
446446In case of input data being supplied to the question, it should be assumed to be a console input.
447447
448448** Solution:**
449- <pre >:
449+ <pre >
450450import re
451451value = []
452452items=[x for x in raw_input().split(',')]
@@ -493,7 +493,7 @@ In case of input data being supplied to the question, it should be assumed to be
493493We use itemgetter to enable multiple sort keys.
494494
495495** Solution:**
496- <pre >:
496+ <pre >
497497from operator import itemgetter, attrgetter
498498
499499l = []
@@ -515,15 +515,14 @@ Define a class with a generator which can iterate the numbers, which are divisib
515515Consider use yield
516516
517517** Solution:**
518- <pre >
518+ <pre >
519519def putNumbers(n):
520520 i = 0
521521 while i<n:
522522 j=i
523523 i=i+1
524524 if j%7==0:
525525 yield j
526-
527526for i in reverse(100):
528527 print i
529528</pre >
@@ -551,7 +550,7 @@ Then, the output of the program should be:
551550In case of input data being supplied to the question, it should be assumed to be a console input.
552551
553552** Solution:**
554- <pre >
553+ <pre >
555554import math
556555pos = [0,0]
557556while True:
You can’t perform that action at this time.
0 commit comments