All Questions
13 questions
2
votes
4
answers
115
views
How can I sort a list of strings in ascending order of numeric part
I have a list of paths which have multiple numerical parts within them, here is part of it:
'C:\\Python\\Python310\\Scripts\\mockup_test\\17mm.JPG',
'C:\\Python\\Python310\\Scripts\\mockup_test\\18mm....
0
votes
3
answers
42
views
How to convert numeric string from a sublist in Python
I'm a freshie. I would like to convert a numeric string into int from a sublist in Python. But not getting accurate results. 😔
countitem = 0
list_samp = [['1','2','blue'],['1','66','green'],['1','88',...
0
votes
1
answer
197
views
I need help converting mobile numeric sequence into actual sentences
I need to create a working mobile numeric keypad converter in python. For example when I give the input "999 33 7777" it's going to print "yes". And then the "0" input is ...
1
vote
2
answers
1k
views
Sort a list of file names numerically in python [duplicate]
I am making a program that shows pictures that were downloaded automatically by said program. I have it so the program makes a list of all the pictures as PIL.Image objects.
The pictures are saved as ...
0
votes
0
answers
762
views
Integration of a function with discrete values
I want to do a integration without knowing the functional equation f(x). I also have only discrete values, which Python has connected by a plot. This one looks like this:
This is the code with the ...
0
votes
1
answer
34
views
extract a numeric order from a numeric list in Python
Let's say that I have a numeric list:
n=[1,2,3,6,7,20,21,22]
I want to write a code that can detect any numeric order inside the list, in this case will be : (1,2,3) and (6,7) and (20,21,22)
Anyone ...
2
votes
3
answers
867
views
Sort numeric lines with thousand separators
I want to sort a list starting with numbers (using Python3).
A lot of these numbers are with thousand separators (dots) and decimals (commas).
extract of mylist:
mylist = ['23 text', '23.130', '...
-1
votes
3
answers
75
views
Sort a python list of strings with a numeric number
I have a list of filenames called filelist
In []: filelist
Out []: ['C:\\Mon20412\\P-2NODE-RAID6-1BLACK-32k-100-segmented.xlsx',
'C:\\Mon25312\\P-2NODE-RAID6-13RED-32k-100-segmented.xlsx',
...
1
vote
6
answers
7k
views
how do i sort data from a csv file numerically in python
I am writing a program that takes students scores from a csv file and needs to sort then highest to lowest score. the csv file looks like this:
josh 12
john 6
fred 8
harry 7
i have tried to ...
11
votes
5
answers
75k
views
Dot product of two lists in Python
I need to write the function dot( L, K ) that should output the dot product of the lists L and K. If these two input lists are not of equal length, dot should output 0. If these two lists are both ...
0
votes
2
answers
229
views
Separating a list into two - Python [duplicate]
For the following code:
print("Welcome to the Atomic Weight Calculator.")
compound = input("Enter compund: ")
compound = H5NO3
lCompound = list(compound)
I want to create two lists from the list ...
2
votes
4
answers
4k
views
Sort a list numerically in Python
So I have this list, we'll call it listA. I'm trying to get the [3] item in each list e.g. ['5.01','5.88','2.10','9.45','17.58','2.76'] in sorted order. So the end result would start the entire list ...
0
votes
7
answers
950
views
How can I convert a list type to a numeric type in Python
I have a external file that is a single column of floating point numbers ( want to be able to expand it to have multiple columns in the future). I want to import it into an array. The file is a cvs ...