Python Forum
if and for statements on the same line
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
if and for statements on the same line
#5
(Sep-17-2018, 08:17 AM)juniorcoder Wrote: Hello Buran ,
I have another similar question . This time I have an matrix like
C=[[1 2 3]
[4 5 6]
[7 8 9]
I need to choose second line [4 5 6] and check if each element is greater than 10. (check 4>10 ,5>10,6>10) and I have to write it in rhe same same with the previous idea . Let's say
if a>b and first element of the second line is greater than 10. (until third element of second line )
How can I write it ?
Thank you so much
Asked in three places!
I am trying to help you, really, even if it doesn't always seem that way


Messages In This Thread
RE: if and for statements on the same line - by gruntfutuk - Sep-17-2018, 03:38 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  If-Print statements on the same line ClassicalSoul 1 2,283 Jan-31-2019, 02:14 PM
Last Post: buran
  Do I always have to use triple quotes or \n for multi-line statements? DragonG 3 2,646 Oct-24-2018, 11:21 AM
Last Post: metulburr

Forum Jump:

User Panel Messages

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