Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

2
Decouple tuples in a list of tuples?
Post Body

Hey everyone, I'm very new to Kotlin and I'm having a very difficult time figuring this out. So I have a list of tuples as such

``` val item1 = Pair(UUID.randomUUID(), "s1") val item2 = Pair(UUID.randomUUID(), "s2") val item3 = Pair(UUID.randomUUID(), "s3") val item4 = Pair(UUID.randomUUID(), "s4")

val tupleList = listOf(item1, item2, item3, item4)

val onlyTheUuids = ? val onlyTheStrings = ? ```

In Python I can do the following, but I'm having a hard time finding a Kotling equivalent ```

inpt = [(uuid.uuid1(), u's1'), (uuid.uuid1(), u's2'), (uuid.uuid1(), u's3')]

zipped = list(zip(*inpt)) print(zipped) [(UUID('9e7ff324-aa3a-11ed-96e7-925e62733aaa'), UUID('9e7ff770-aa3a-11ed-96e7-925e62733aaa'), UUID('9e7ff7b6-aa3a-11ed-96e7-925e62733aaa')), ('s1', 's2', 's3')]

noticed how the uuids and the strings are separated

```

Perhaps I'm lacking the proper terminology to properly google this, but not much is showing up.

Author
Account Strength
60%
Account Age
2 years
Verified Email
Yes
Verified Flair
No
Total Karma
537
Link Karma
128
Comment Karma
409
Profile updated: 1 week ago
Posts updated: 1 month ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
1 year ago