I have a for loop that iterates over an array of movies that a person has played in, and it outs that output together. This is the code:
p = Interpreter["Person"]["Einstein"];
MovieAppearancesParsed = "";
MovieAppearances = EntityValue[p, "MovieAppearances"];
For[i = 0, i < Length[MovieAppearances], i++,MovieAppearancesParsed <>";;"<> ToString[EntityValue[Part[MovieAppearances, i],"Name"]]]
Print[MovieAppearancesParsed]
that doesn't work, MovieAppearancesParsed doesn't get changed at all I can, however, do this:
p = Interpreter["Person"]["Einstein"];
MovieAppearancesParsed = "test";
MovieAppearances = EntityValue[p, "MovieAppearances"];
For[i = 0, i < Length[MovieAppearances], i++ ,Print[EntityValue[Part[MovieAppearances, i],"Name"]]]
Print[MovieAppearancesParsed]
but that prints this: " EntityValue[List,Name] Der ewige Jude Naqoyqatsi Trinity and Beyond: The Atomic Bomb Movie Atomic Power test "
why can't I use the first approach? I can't use the last one, as I format the output and there is other stuff that I need to format with it.