Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: accessing value in dict_values class
Post: RE: accessing value in dict_values class

The thing is that even when i ask a question that other people understand, you find a way to bitch about it, and if by a miracle you like the question that i ask you find a way to not take into accoun...
CompleteNewb General Coding Help 14 5,193 Mar-28-2022, 10:13 PM
    Thread: accessing value in dict_values class
Post: RE: accessing value in dict_values class

in case you haven't noticed, answering question is a voluntary act
CompleteNewb General Coding Help 14 5,193 Mar-28-2022, 09:03 PM
    Thread: accessing value in dict_values class
Post: RE: accessing value in dict_values class

(Mar-28-2022, 08:00 PM)deanhystad Wrote: If your list only contains 1's why are you using a counting dictionary? The purpose of a counting dictionary is to group items by value and count them. If ...
CompleteNewb General Coding Help 14 5,193 Mar-28-2022, 08:29 PM
    Thread: accessing value in dict_values class
Post: RE: accessing value in dict_values class

(Mar-28-2022, 07:10 PM)deanhystad Wrote: Still not understanding. If c1 is a Counter, x = c1.values() will be a sequence of numbers (actually a generator). from collections import Counter values = ...
CompleteNewb General Coding Help 14 5,193 Mar-28-2022, 07:31 PM
    Thread: accessing value in dict_values class
Post: RE: accessing value in dict_values class

(Mar-27-2022, 11:08 PM)stevendaprano Wrote: I have read your post three times and I still don't understand what you are trying to do **huh** (Mar-27-2022, 09:40 PM)CompleteNewb Wrote: i need to...
CompleteNewb General Coding Help 14 5,193 Mar-28-2022, 06:29 PM
    Thread: accessing value in dict_values class
Post: accessing value in dict_values class

i have this program snippet: samelist = [] list1 = [] lst = [1,1] alllist = { 4:[1,1,1,1], 5:[1,1,1], 6:[1,1] } for i in lst: c1 = Counter(i) for j,k in alllists.items(): c2 ...
CompleteNewb General Coding Help 14 5,193 Mar-27-2022, 09:40 PM
    Thread: list sort() function bring backs None
Post: RE: list sort() function bring backs None

Thank you, I'll check out the ressources you just gave me before asking question here in the future but trust me i search the web before asking question, i just don't seem to be good at it
CompleteNewb General Coding Help 6 4,136 Mar-25-2022, 11:57 PM
    Thread: list sort() function bring backs None
Post: RE: list sort() function bring backs None

thank you
CompleteNewb General Coding Help 6 4,136 Mar-20-2022, 09:51 PM
    Thread: list sort() function bring backs None
Post: list sort() function bring backs None

i have a program that gives back a random list of numbers which i then sort using .sort() , but then this happened: list1 = [1,1,1,1,1] list2 = list1.sort[] print(list2)output Nonewhy do...
CompleteNewb General Coding Help 6 4,136 Mar-20-2022, 08:57 PM
    Thread: how do change data in a database
Post: RE: how do change data in a database

(Mar-19-2022, 02:05 AM)Larz60+ Wrote: Data is arranged serially in a CSV file, when I think of database, I think about tables that are arranged in a DBMS such as sqlite, PostGreSQL, Oracle, MySQL, e...
CompleteNewb Data Science 5 2,215 Mar-20-2022, 08:51 PM
    Thread: how do change data in a database
Post: RE: how do change data in a database

(Mar-18-2022, 01:21 AM)Larz60+ Wrote: Which DBMS? You will need to use SQL (database query language). i just load a csv file with db = pd.read_csv('playerhistory.csv') db.to_csv('playerhistory.csv')
CompleteNewb Data Science 5 2,215 Mar-18-2022, 11:00 PM
    Thread: how to assign items from a list to a dictionary
Post: how to assign items from a list to a dictionary

How can i simplify this code? listplayers = [['player1', 5,1,300,100],['player2', 10,5,650,150],['player3', 17,6,1100,1050]] dictionary = { 'playersname':[] 'totalwin':[] 'totalloss':[] ...
CompleteNewb General Coding Help 3 1,586 Mar-18-2022, 10:46 PM
    Thread: why is my list a tuple
Post: RE: why is my list a tuple

thank you very much. I thought i was going crazy here
CompleteNewb General Coding Help 7 2,280 Mar-17-2022, 10:09 PM
    Thread: how do change data in a database
Post: how do change data in a database

i have list of list listofplayers = [[player1, 5,1,300,100],[player11, 10,5,650,150],[player23, 17,6,1100,1050]] and i have a database player, win, lost, moneywin, moneylost player1, 3 , 0 , 2...
CompleteNewb Data Science 5 2,215 Mar-17-2022, 10:06 PM
    Thread: why is my list a tuple
Post: RE: why is my list a tuple

yeah sorry, but i think my python IDE is playing tricks on me. I would delete the post but i can't sorry
CompleteNewb General Coding Help 7 2,280 Mar-12-2022, 11:43 PM
    Thread: why is my list a tuple
Post: why is my list a tuple

i have this code: hand = [] card = [] flop = [] turn = [] river = [] outs = [] possiblefullhouse = False cardsdrawn = [] player = Player() cardsdrawn = [] playersgrade = [] random.shuffle(deck) ...
CompleteNewb General Coding Help 7 2,280 Mar-12-2022, 09:54 PM
    Thread: trying to write a dictionary in a csv file
Post: RE: trying to write a dictionary in a csv file

(Mar-04-2022, 03:07 AM)deanhystad Wrote: What argument does csv.DictWriter.writerows() expect? What is it's return value? csvwriter.writerows(csvwriter.writerows(straightdictlist)) well you said th...
CompleteNewb General Coding Help 13 6,622 Mar-04-2022, 04:10 AM
    Thread: trying to write a dictionary in a csv file
Post: RE: trying to write a dictionary in a csv file

(Mar-04-2022, 12:17 AM)deanhystad Wrote: CSV files are extremely limited. If you want to save and restore information about the current state of your program. I strongly suggest using a JSON format...
CompleteNewb General Coding Help 13 6,622 Mar-04-2022, 12:21 AM
    Thread: trying to write a dictionary in a csv file
Post: RE: trying to write a dictionary in a csv file

well, i don't even know what a JSON file is and i have other program that uses csv files so my priority is to learn how to manipulate csv files. JSON is something i want to learn to but it is very low...
CompleteNewb General Coding Help 13 6,622 Mar-03-2022, 11:59 PM
    Thread: trying to write a dictionary in a csv file
Post: RE: trying to write a dictionary in a csv file

oh so you need a list of dictionaries... but it still gives me this error and i can't figure it out? Error:Traceback (most recent call last): File "/usr/lib/python3.8/idlelib/run.py", line 559, in ...
CompleteNewb General Coding Help 13 6,622 Mar-03-2022, 11:21 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020