#๐Ÿ”’ Can anyone help me to check where is the problem happen to my code?

18 messages ยท Page 1 of 1 (latest)

regal seal
#

EmployeeInfo:[
EmpID=["1","2","3","4","5"]
EmpFname=["Sanjay","Ananya","Rohan","Sonia","Ankit"]]
def Upper(EmployeeInfo):
for EmpFname in EmployeeInfo:
ALIAS=print(text.upper(EmpFname[0:4]))
print(ALIAS)

The question required me to write a query to fetch EmpFname from the table name EmployeeInfo in the upper case and ALIAS must be the varialbkke name of Empname PLS HELP

pine oracleBOT
#

@regal seal

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

finite ocean
#

what is actually Employeeeinfo?

#

list of list?

viscid rain
#

Quite a few things wrong here.

#

If you have 2 lists of equal lengths you can zip them together to turn into a dictionary.

#

This will be good if you wanted to make employee id the dict key with the name the value.

#

The print function may print a sting to stdout though returns none. This meant a the line where you have alias=print(โ€ฆ is just assigning none to alias.

regal seal
regal seal
umbral whale
#

!d zip

pine oracleBOT
#
zip

zip(*iterables, strict=False)```
Iterate over several iterables in parallel, producing tuples with an item from each one.

Example:

```py
>>> for item in zip([1, 2, 3], ['sugar', 'spice', 'everything nice']):
...     print(item)
...
(1, 'sugar')
(2, 'spice')
(3, 'everything nice')
```...
umbral whale
#

like that. it's really fun

regal seal
pine oracleBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.