+ 1

How do i add list of 100 cricket player name and assign their country name to them.please help with the code

How do i add list of 100 cricket player name and assign their country name to them.please help with the code

14th Jun 2019, 5:36 AM
karan singh
karan singh - avatar
10 ответов
+ 2
Sounds like you need to use a dictionary for this problem
14th Jun 2019, 5:45 AM
Trigger
Trigger - avatar
+ 2
That is one downside. You have to use unique values for your primary key I suggest an ID number or player number (on jersey) as key
14th Jun 2019, 6:10 AM
Trigger
Trigger - avatar
+ 2
{Jersey_Number:[name, country]} Use a list *inside* a dictionary! (triumphant music)
14th Jun 2019, 6:22 AM
Trigger
Trigger - avatar
+ 2
No problem. Bear in mind I do not know swift, Im using general programming knowledge. I can't help you with syntax😅
14th Jun 2019, 6:43 AM
Trigger
Trigger - avatar
+ 2
Sure not a problem some help is great hlp
14th Jun 2019, 7:06 AM
karan singh
karan singh - avatar
+ 1
Can you help me with a line to show how to. I am learning swift as of now
14th Jun 2019, 5:50 AM
karan singh
karan singh - avatar
+ 1
If i use country with the player name will it not be an issue if i have 5 players from canada in the list???
14th Jun 2019, 5:55 AM
karan singh
karan singh - avatar
+ 1
Yes is it so how can i add player and country together
14th Jun 2019, 6:20 AM
karan singh
karan singh - avatar
+ 1
I need that too as per client requirement
14th Jun 2019, 6:20 AM
karan singh
karan singh - avatar
+ 1
Thank you for your help. I would need more of your help in coming week
14th Jun 2019, 6:42 AM
karan singh
karan singh - avatar