import cProfile def f1(): f = [i**2 for i in range(1,200001)] return f def f2(): g = (j**2 for j in range(1,200001)) yield g cProfile.runctx('f1()',globals(),locals()) cProfile.runctx('f2()',globals(),locals()) '''here's ur solution'''
runctx method of cProfile module.
runctx method of cProfile module.
|
|
Messages In This Thread |
runctx method of cProfile module. - by rahulnatarajan98 - Oct-21-2019, 10:53 AM
RE: runctx method of cProfile module. - by buran - Oct-21-2019, 10:59 AM
RE: runctx method of cProfile module. - by sachinladhad - Oct-22-2019, 03:18 AM
RE: runctx method of cProfile module. - by buran - Oct-22-2019, 06:01 AM
RE: runctx method of cProfile module. - by FaizKarim - Oct-23-2019, 05:43 PM
RE: runctx method of cProfile module. - by buran - Oct-23-2019, 06:13 PM
|
Users browsing this thread: 1 Guest(s)