Group Abstract Group Abstract

Message Boards Message Boards

0
|
3.8K Views
|
1 Reply
|
2 Total Likes
View groups...
Share
Share this post:

String manipulation not working

Posted 4 years ago
POSTED BY: Faas Tubee
Posted 4 years ago

Hi Faas,

MovieAppearancesParseddoesnt get changed at all

Because there is no assignment to it in the loop

Some beginner WL advice

  • Avoid using symbol names that start with an uppercase letter, they are used by WL built-ins.
  • Use functional constructs (e.g. Map) rather than procedural constructs (e.g. For).
  • Decouple data collection and processing
    p = Interpreter["Person"]["Einstein"];
    movieAppearances = EntityValue[p, "MovieAppearances"];

    movieNames = #["Name"] & /@ movieAppearances
    (*
    {"Der ewige Jude", "Naqoyqatsi", "Trinity and Beyond: The Atomic Bomb Movie", "Atomic Power", 
    "The Yellow Star – The Persecution of the Jews in Europe 1933–45"}
    *)

Single String with names delimited by ;;

StringRiffle[movies, ";;"]
(* Der ewige Jude;;Naqoyqatsi;;Trinity and Beyond: The Atomic Bomb Movie;;Atomic Power;;The Yellow Star – The Persecution of the Jews in Europe 1933–45 *)
POSTED BY: Rohit Namjoshi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard