View all Dictionary values in one statement, as you can in Python?

In Python there is a way to display all values in a Dictionary in one statement, as shown
My dictionary: “cars”.

image

Is there a similar statement in UIPath, other than a For each loop, to perform the same function?

MaryB

YourDicitionaryVariable .Select(function (e) e.Key + “—” + e.Value.toString).ToArray))

yah thats possible
if the dictionary variable is stored in a variable named variable1
where variable1 is of type
System.Collections.Generic.Dictionary(of string, string)

then
in writeline activity like this
String.Join(“,”,variable1.Values.ToArray()).ToString

Cheers @MaryB2019

1 Like

Thank you Palaniyappan, it works great for both Values and Keys. It’s a faster way to check my dictionary entries.
MaryB

1 Like

Cheers @MaryB2019

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.