9 questions
I heard that it's very comfortable to use notation, but it's hard to learn.I'm not sure yet, but can you give me an example?
I want to extract am is z from the string my name is z from python3[4: ] Not like thisExtract from a, and if z comes out, it's over. [a: z] For example, if it's adkzed, I want to print only adkz Pleas...
[start:end:step] when slicing the list.a=[1,2,3,4,5]a[:] #[1,2,3,4,5]a[0:5] #[1,2,3,4,5]with the same return valuea[::-1] #[5,4,3,2,1]a[0:5:-1] #[]For a[0:5:-1], the return value is changed by the emp...
You are a Python user.For example, if you have the string a=apple,banana,cow,print_1=appleprint_2=bananaprint_3=cowHow do you create a code that stores it like this?(It's a beginner. I look forward to...
If you just slice based on certain characters, those characters don't appear, but only the words are cut off and stored in the list. For exampleHello, world. If you slice it according to ,[Hello, worl...
number = '9-11'number1 = '10-30'In Python, how do I print only the values in front of it, and the values in the back?However, since the units of numbers are different like 9 and 10, it is not extracte...
I'd like to cut and print the bottom list combination of 5 pieces, so can you make the list slice range with a loop and make it automatically??num = int(input())moc = num//4namu = num%4like = 0hell = ...
© 2024 OneMinuteCode. All rights reserved.