Python Forum
[split] question about list comprehension
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[split] question about list comprehension
#6
Thanks a lot for helping me understand this but now if I enter say 10 in this case the string it will be .split () will be output to '1' and '0' as then in the following line I assign y the value of 10 variables di then inside the formula I get result 6? I apologize in advance if I'm bored, but I've been messing with this code all day and can't handle it completely.
Thank you all very much
Reply


Messages In This Thread
RE: [split] question about list comprehension - by Armin - Jan-12-2020, 05:11 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  List Comprehension Issue johnywhy 5 628 Jan-14-2024, 07:58 AM
Last Post: Pedroski55
Question mypy unable to analyse types of tuple elements in a list comprehension tomciodev 1 525 Oct-17-2023, 09:46 AM
Last Post: tomciodev
  Using list comprehension with 'yield' in function tester_V 5 1,337 Apr-02-2023, 06:31 PM
Last Post: tester_V
  [split] why can't i create a list of numbers (ints) with random.randrange() astral_travel 7 1,610 Oct-23-2022, 11:13 PM
Last Post: Pedroski55
  list comprehension 3lnyn0 4 1,485 Jul-12-2022, 09:49 AM
Last Post: DeaD_EyE
  Split string using variable found in a list japo85 2 1,348 Jul-11-2022, 08:52 AM
Last Post: japo85
  [split] [split] New to the forum, how to post a question? karnik 2 1,321 Feb-12-2022, 03:45 PM
Last Post: deanhystad
  List comprehension used differently coder_sw99 3 1,777 Oct-03-2021, 04:12 PM
Last Post: coder_sw99
  How to invoke a function with return statement in list comprehension? maiya 4 2,933 Jul-17-2021, 04:30 PM
Last Post: maiya
  List comprehension and Lambda cametan 2 2,291 Jun-08-2021, 08:29 AM
Last Post: cametan

Forum Jump:

User Panel Messages

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