Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Converting data in CSV and TXT to dictionary
Post: RE: Converting data in CSV and TXT to dictionary

Thank you, not entirely sure what is happening on lines #4 and #5?
kam_uk General Coding Help 3 2,032 Dec-22-2020, 06:27 PM
    Thread: Help with Python dictionaries
Post: RE: Help with Python dictionaries

Thanks! So using your example, the best data structure would be similar to the below? The 001, 002 represent the VIN (equivalent to my EmployeeID) cars = { '001': {'brand': 'volvo', 'model': 'X...
kam_uk Homework 5 2,543 Dec-22-2020, 04:02 PM
    Thread: Converting data in CSV and TXT to dictionary
Post: Converting data in CSV and TXT to dictionary

Hi I have data in data.csv and data.txt that I want to convert to a python3 dictionary via code, without the use of Pandas. Is this possible? I have been googling but a lot inevitably go off into th...
kam_uk General Coding Help 3 2,032 Dec-22-2020, 03:51 PM
    Thread: Help with Python dictionaries
Post: Help with Python dictionaries

Hi I have a list of employees in various file formats, but they all have the same descriptions for the data, EmployeeID - this is unique FirstName LastName Telephone Email Address City State Country...
kam_uk Homework 5 2,543 Dec-21-2020, 11:26 PM
    Thread: Case sensitive checks
Post: Case sensitive checks

I have a list of current users in list. I have a list of new users in a list. I want to loop through the new users and make sure the username has not been used already. If it has print a bespoke mess...
kam_uk General Coding Help 2 2,041 Nov-29-2020, 05:55 PM
    Thread: If / loops help
Post: If / loops help

Hi I am going through the Python Crash Course book, and answering the questions in each chapter. I'm stuck at one. The question is: 1. Create a list of numbers from 1 - 9 2. Loop through the list ...
kam_uk Homework 4 2,112 Nov-29-2020, 05:49 PM
    Thread: Dictionary question
Post: RE: Dictionary question

Thanks for all the response! The below looks interesting, could someone explain the code? [python] def car(make, model, style, year, color): return {'make':make, 'model':model, 'style':style, 'y...
kam_uk Homework 7 3,095 Nov-21-2020, 08:18 PM
    Thread: Dictionary question
Post: RE: Dictionary question

Thanks...can I not do this just using dictionary rather than a list of dictionary? I am specifically trying to learn about dictionaries here.
kam_uk Homework 7 3,095 Nov-21-2020, 12:33 PM
    Thread: Convert list of numbers to string of numbers
Post: RE: Convert list of numbers to string of numbers

Thanks, can you explain the code to me and why we are doing this? What is wrong with my first line?
kam_uk Homework 5 3,077 Nov-21-2020, 12:30 PM
    Thread: Dictionary question
Post: Dictionary question

Hey All I have a dictionary as such car_dictionary = { "Ford" : "Blue", "Nissan" : "Red" }I want to assign a parameter (or is it argument) to the key/value so they are labelled as "make" and...
kam_uk Homework 7 3,095 Nov-21-2020, 02:07 AM
    Thread: Convert list of numbers to string of numbers
Post: Convert list of numbers to string of numbers

Hi I have a list My_list = [1, 2, 3, 4, 5]I want to convert each number from an integer to a string. I would normally use My_string = ''.join(My_list)but that doesn't appear to work.... what am I ...
kam_uk Homework 5 3,077 Nov-21-2020, 01:50 AM
    Thread: Help with Python functions
Post: RE: Help with Python functions

Thanks. So a and b are parameters, whereas first_name and last_name are arguments? I still don't understand how a is related to first_name and b to last_name?
kam_uk Homework 4 2,228 Nov-15-2020, 10:15 PM
    Thread: Help with Python functions
Post: Help with Python functions

Hi I am trying one of the HackerRank challenges. I have the following code in Python as part of a problem. What I need to do is have an output that says "Hello <firstname> <lastname>! Y...
kam_uk Homework 4 2,228 Nov-15-2020, 08:13 PM
    Thread: Block comment in Intellij
Post: RE: Block comment in Intellij

Perfect! thanks
kam_uk General Coding Help 2 2,333 Nov-15-2020, 05:22 PM
    Thread: Learning about if statements
Post: Learning about if statements

Bello, I am learning about if statements. The question is to assign True or False to variables small and green. Then write some if/else statements to print which of these matches those choices; cherry...
kam_uk Homework 1 2,058 Nov-15-2020, 04:59 PM
    Thread: Block comment in Intellij
Post: Block comment in Intellij

Hi All I am using Intellij with Python 3.8. I'd like to block comment code, but can't figure this out and no amount of googling is helping! I went to settings in Intellij, which pointed me to CTRL a...
kam_uk General Coding Help 2 2,333 Nov-15-2020, 04:31 PM
    Thread: Printing sequence of numbers
Post: Printing sequence of numbers

Hello I am trying to print a print the folliwing 123...n So, for example, if n = 5, we would print 12345 I played around and Googled, and wrote this for i in range(1,n): print (i, end="") Th...
kam_uk Homework 1 2,866 Sep-27-2020, 12:36 PM

User Panel Messages

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