27 questions
We are making a function that receives 2 lists and cuts randomly after shuffling. I even followed the location when it became random, but I didn't know how to cut it together during the cutting proces...
Hello, I'm a beginner in programming. I want to divide the elements in the list into random sizes, what should I do? a = [ 1, 2, 3, 4, 5, 6, 7, 8]#At the time of outputa = [[1,2],[3,4,5],[6,7],[8]]a =...
How can I use the range function to input raw_input and repeatedly output the input value 100 times.
def ndiv(l,n): return [l[i:i + n] for i in xrange(0, len(l) // n * n, n)] + [[e] for e in l[len(l) // n * n:]] print INSERTION : {}.format(ndiv(insertion, i)) print INSERTION1 : {}.format(ndiv(inserti...
import syssrc = sys.argv[1]dst = sys.argv[2]f = open(src)tab_content = f.read()f.close()space_content = tab_content.replace(\t, *4)f = open(dst, 'w')f.write(space_content)f.close()It's a code that ch...
import sqlite3import datetimeDT_Now = datetime.datetime.now()Today = {}{}{}.format(DT_Now.year, DT_Now.month, DT_Now.day)information = sqlite3.connect(info.db)curs = information.cursor()def CreateTabl...
Existing Python version is 3.6 I tried to change it to Python 2.7 because the module I was going to use didn't work.So even though I changed Python like the capture screen, it keeps coming out as 3.6....
« | - 3 - |
© 2024 OneMinuteCode. All rights reserved.