leftHand(empty).
rightHand(empty).
inHands :-
    write("Left hand:"),
    nl,
    leftHand(X),
    tab(2),
    write(X),
    nl,
    nl,
    write("Right开发者_开发问答 hand:"),
    rightHand(Y),
    tab(2),
    write(Y),
    nl.
I expect inHands. to return something like this:
Left hand:
  empty
Right hand:
  empty
However, this is what I saw:
 24 ?- inHands.
[76, 101, 102, 116, 32, 104, 97, 110, 100, 58]
  empty
[82, 105, 103, 104, 116, 32, 104, 97, 110, 100, 58]  empty
true.
What am I doing wrong here?
Turns out I have to use single quotes like this:
write('My text').
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论